package com.zhang.service;

import com.zhang.mapper.EmployeeMapper;
import com.zhang.pojo.Employee;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ZhangJunqi
 * @Date 2022/3/2 -21:41
 */
@Service
public class EmployeeService {
    @Resource
    private EmployeeMapper employeeMapper;
    public List<Employee> getAllEmployee() {
        return employeeMapper.getAllEmployee ();
    }

    public int saveEmployee(Employee employee) {
        return employeeMapper.saveEmployee (employee);
    }

    public int empUpdate(Employee employee) {
        return employeeMapper.empUpdate(employee);
    }

    public int deleteEmployeeById(Integer id) {
        return employeeMapper.deleteEmployeeById(id);
    }
}
